home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amoszine 8
/
Amoszine 8 (Disk 2 of 3).adf
/
Powerbobs.lha
/
powerbobsv1.0
/
examples
/
Inc_Array_vs_Pinc_Array.asc
< prev
next >
Wrap
Text File
|
1992-09-02
|
587b
|
36 lines
'This example shows the use of the Pinc command.
'Beware...if more than 400 is entered, be sure to have a cup of tea.
'
'One array containing 1001 elements (0 -> 1000) is first Dimensioned.
'
'Enter 0 (zero) to stop the speed test.
'
Dim X(1000)
Do
Input "Give range, max 1000 : ";_MAX
'
If _MAX=0 Then End
'
T=Timer
For I=1 To 1000
For K=0 To _MAX
Inc X(K)
Next
Next
'
'Display the ellapsed time in Vbl's
'
Print Timer-T
'
ADRESS_X=Varptr(X(0))
T=Timer
For I=1 To 1000
Pinc ADRESS_X,0 To _MAX
Next
'
'Display the ellapsed time in Vbl's
'
Print Timer-T
'
Loop